<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      @media screen and (max-width: 640px) {
        html {
          font-size: 100px;
        }
      }
      @media screen and (max-width: 320px) {
        /* 问题：注意层叠性！不能将 max-width:640px 的一项放在 max-width:320px 后 */
        html {
          font-size: 50px;
        }
      }
      h2 {
        height: 1rem;
        line-height: 1rem;
        font-size: 0.5rem;
        text-align: center;
        background-color: pink;
      }
    </style>
  </head>
  <body>
    <h2>花样年华</h2>
  </body>
</html>
